﻿using Modelo;
using Presenter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace UserInterface_View
{
    public partial class ListarUsuarios : System.Web.UI.Page
    {
        ListarUsuariosPresenter _PListarUsuarios;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            _PListarUsuarios = new ListarUsuariosPresenter();
        }

        protected void btnLista_Click(object sender, EventArgs e)
        {
            List<Pessoa> lstUsuarios = _PListarUsuarios.ListarUsuarios(txtNome.Text);
            grdLista.DataSource = lstUsuarios;
            grdLista.DataBind();
        }
    }
}